package com.baizhi.hospital.service.impl;

import com.baizhi.hospital.annotation.LogAnnotation;
import com.baizhi.hospital.dao.ExamDao;
import com.baizhi.hospital.entity.Exam;
import com.baizhi.hospital.service.ExamService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class ExamServiceImpl implements ExamService {
    //private Logger logger = LoggerFactory.getLogger(ExamServiceImpl.class);
    @Autowired(required = false)
    private ExamDao examDao;
    @Override
    //@LogAnnotation(value = "查询审核信息",type = "selectExamByPage")
    public Map selectExamByPage(int page, int limit) {
        int offset=(page-1)*limit;
        List<Exam> exams = examDao.selectExamByPage(offset, limit);
        int count = examDao.selectCount();
        Map map=new HashMap();
        map.put("code",0);
        map.put("msg","");
        map.put("count",count);
        map.put("data",exams);
        return map;

    }
}
